import request from '@/utils/request'

// 查询充电用户列表
export function listExternalUser(query) {
  return request({
    url: '/externalUser/list',
    method: 'get',
    params: query
  })
}

// 查询充电用户详细
export function getExternalUser(userId) {
  return request({
    url: '/externalUser/getInfoById/' + userId,
    method: 'get'
  })
}

// 新增充电用户
export function addExternalUser(data) {
  return request({
    url: '/externalUser/add',
    method: 'post',
    data: data
  })
}

// 修改充电用户
export function updateExternalUser(data) {
  return request({
    url: '/externalUser/edit',
    method: 'put',
    data: data
  })
}

// 删除充电用户
export function delExternalUser(userId) {
  return request({
    url: '/externalUser/remove/' + userId,
    method: 'delete'
  })
}
